package com.github.xuemingyu.springboot.acticitycloud.service;

import com.bidanet.bdcms.core.vo.Page;
import com.github.xuemingyu.springboot.acticitycloud.entity.Department;
import com.taobao.api.ApiException;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;
import java.util.Map;

public interface DepartmentService extends BaseService<Department> {
    /**
     * 获取用户部门查询指定用户的所有上级父部门路径列表
     *
     * @param department
     * @param page
     */
    void queryLike(Department department, Page<Department> page);

    /**
     * 添加
     *
     * @param department
     */
    void insert(Department department);

    /**
     * 获取该用户的下级用户userId list
     *
     * @param userId
     * @return
     * @throws ApiException
     */
    List<String> getAuthority(String userId) throws ApiException;

    /**
     * 根据部门查询用户userId list
     *
     * @param dept
     */
    Map<String, List<String>> getUserByDept(String dept);

    /**
     * 同步用户数据
     * @param file
     */
    void importUser(MultipartFile file);
}
